/**
 * 
 */
package com.zufangbao.earth.entity.contractpartical;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.zufangbao.gluon.api.earth.TransferStatus;
import com.zufangbao.sun.entity.contract.Contract;

/**
 * @author wukai
 *
 */
@Entity
@Table(name = "contract_partical")
public class ContractPartical implements java.io.Serializable{
	
	private static final long serialVersionUID = 4622422465026878476L;

	@Id
	@GeneratedValue
	private Long id ;
	
	private String particalUniqueId;
	
	@ManyToOne(fetch = FetchType.LAZY ,optional = false)
	private Contract contract;
	
	@Enumerated(EnumType.ORDINAL)
	private TransferStatus channelAssgin;
	
	private Date modifiedTime;

	private boolean isDelete;
	
	public ContractPartical() {
		super();
	}

	
	public ContractPartical(String particalUniqueId, Contract contract,
			TransferStatus channelAssgin) {
		super();
		this.particalUniqueId = particalUniqueId;
		this.contract = contract;
		this.channelAssgin = channelAssgin;
		this.modifiedTime = new Date(System.currentTimeMillis());
		this.isDelete = false;
	}


	public String getParticalUniqueId() {
		return particalUniqueId;
	}

	public void setParticalUniqueId(String particalUniqueId) {
		this.particalUniqueId = particalUniqueId;
	}


	public Contract getContract() {
		return contract;
	}

	public void setContract(Contract contract) {
		this.contract = contract;
	}

	public TransferStatus getChannelAssgin() {
		return channelAssgin;
	}

	public void setChannelAssgin(TransferStatus channelAssgin) {
		this.channelAssgin = channelAssgin;
	}

	public Date getModifiedTime() {
		return modifiedTime;
	}

	public void setModifiedTime(Date modifiedTime) {
		this.modifiedTime = modifiedTime;
	}

	public boolean isDelete() {
		return isDelete;
	}

	public void setDelete(boolean isDelete) {
		this.isDelete = isDelete;
	}
	
}
